{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e46a65b1-7cf0-4cc2-8aca-529d659630a4",
   "metadata": {},
   "source": [
    "# Start Keycloak server"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "374e8693-7e47-4985-b7f6-a9b818b0b4d0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Updating the configuration and installing your custom providers, if any. Please wait.\n",
      "2024-09-09 06:37:54,515 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index org.springframework.core.io.Resource: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,518 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index org.springframework.core.io.DefaultResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,519 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index org.springframework.core.io.ResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,525 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index org.apache.tools.ant.Task: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,568 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index org.apache.activemq.artemis.core.journal.RecordInfo: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,568 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index org.apache.activemq.artemis.core.journal.Journal: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,569 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index io.mashona.logwriting.ArrayStore: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,573 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index jakarta.jms.XAConnection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,574 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index jakarta.jms.XASession: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,574 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index jakarta.jms.XAConnectionFactory: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:54,657 WARN  [io.qua.dep.ind.IndexWrapper] (build-5) Failed to index jakarta.jms.Connection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@6d91790b\n",
      "2024-09-09 06:37:58,410 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 7235ms\n",
      "2024-09-09 06:37:59,697 INFO  [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: Base URL: <unset>, Hostname: <request>, Strict HTTPS: false, Path: <request>, Strict BackChannel: false, Admin URL: <unset>, Admin: <request>, Port: -1, Proxied: false\n",
      "2024-09-09 06:37:59,903 WARN  [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled\n",
      "2024-09-09 06:37:59,949 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'\n",
      "2024-09-09 06:38:01,394 WARN  [io.quarkus.agroal.runtime.DataSources] (JPA Startup Thread) Datasource <default> enables XA but transaction recovery is not enabled. Please enable transaction recovery by setting quarkus.transaction-manager.enable-recovery=true, otherwise data may be lost if the application is terminated abruptly\n",
      "2024-09-09 06:38:02,119 INFO  [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: node_693934, Site name: null\n",
      "2024-09-09 06:38:02,122 INFO  [org.keycloak.broker.provider.AbstractIdentityProviderMapper] (main) Registering class org.keycloak.broker.provider.mappersync.ConfigSyncEventListener\n",
      "2024-09-09 06:38:03,086 INFO  [org.keycloak.quarkus.runtime.storage.legacy.liquibase.QuarkusJpaUpdaterProvider] (main) Initializing database schema. Using changelog META-INF/jpa-changelog-master.xml\n",
      "\n",
      "UPDATE SUMMARY\n",
      "Run:                        124\n",
      "Previously run:               0\n",
      "Filtered out:                 0\n",
      "-------------------------------\n",
      "Total change sets:          124\n",
      "\n",
      "2024-09-09 06:38:05,143 INFO  [org.keycloak.services] (main) KC-SERVICES0050: Initializing master realm\n",
      "2024-09-09 06:38:06,418 INFO  [org.keycloak.services] (main) KC-SERVICES0009: Added user 'admin' to realm 'master'\n",
      "2024-09-09 06:38:06,492 INFO  [io.quarkus] (main) Keycloak 24.0.4 on JVM (powered by Quarkus 3.8.4) started in 7.761s. Listening on: http://0.0.0.0:8080\n",
      "2024-09-09 06:38:06,492 INFO  [io.quarkus] (main) Profile dev activated. \n",
      "2024-09-09 06:38:06,492 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, keycloak, logging-gelf, narayana-jta, reactive-routes, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]\n",
      "2024-09-09 06:38:06,495 WARN  [org.keycloak.quarkus.runtime.KeycloakMain] (main) Running the server in development mode. DO NOT use this configuration in production.\n"
     ]
    }
   ],
   "source": [
    "!docker run --rm -p 9999:8080 --name my-keycloak \\\n",
    "-e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin \\\n",
    "quay.io/keycloak/keycloak:24.0.4 start-dev"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d2d1e035-85b3-4d77-abb3-13af5e31ef37",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
